import 'package:finance_app/src/entities/dashboard_entity.dart';

dashboardEntityFromJson(DashboardEntity data, Map<String, dynamic> json) {
	if (json['balance'] != null) {
		data.balance = json['balance'].toString();
	}
	if (json['unpaid_invoice'] != null) {
		data.unpaidInvoice = json['unpaid_invoice'].toString();
	}
	if (json['unpaid_invoice_overdue'] != null) {
		data.unpaidInvoiceOverdue = json['unpaid_invoice_overdue'].toString();
	}
	if (json['unpaid_bill'] != null) {
		data.unpaidBill = json['unpaid_bill'].toString();
	}
	if (json['unpaid_bill_overdue'] != null) {
		data.unpaidBillOverdue = json['unpaid_bill_overdue'].toString();
	}
	return data;
}

Map<String, dynamic> dashboardEntityToJson(DashboardEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['balance'] = entity.balance;
	data['unpaid_invoice'] = entity.unpaidInvoice;
	data['unpaid_invoice_overdue'] = entity.unpaidInvoiceOverdue;
	data['unpaid_bill'] = entity.unpaidBill;
	data['unpaid_bill_overdue'] = entity.unpaidBillOverdue;
	return data;
}